package com.wkbb.common.enums;

/**
 * @author luowenyan
 * @version V1.0
 * @className SettingsEnum
 * @description
 * @date 2019/7/26 18:02
 */
public enum SettingsEnum {

    /**
     * 2G/3G/4G自动播放开关
     */
    PLAY_SWITCH("play_switch","2G/3G/4G自动播放开关");

    private SettingsEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;

    private String desc;

    public String getValue() {
        return this.value;
    }

    public void setValue(String code) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(String value) {
        for (SettingsEnum settings : SettingsEnum.values()) {
            if (settings.getValue().equals(value)) {
                return settings.getDesc();
            }
        }
        return null;
    }
}
